FetchDomain

class FetchDomain : Domain

A domain for letting clients substitute browser's network layer with client code.

Functions

authRequired
Link copied to clipboard
fun authRequired(): Flowable<AuthRequiredEvent>
Issued when the domain is enabled with handleAuthRequests set to true.
continueRequest
Link copied to clipboard
fun continueRequest(input: ContinueRequestRequest): Single<RequestResponseFrame>
Continues the request, optionally modifying some of its parameters.
continueWithAuth
Link copied to clipboard
fun continueWithAuth(input: ContinueWithAuthRequest): Single<RequestResponseFrame>
Continues a request supplying authChallengeResponse following authRequired event.
description
Link copied to clipboard
fun description(): String
Returns domain description.
disable
Link copied to clipboard
fun disable(): Single<RequestResponseFrame>
Disables the fetch domain.
enable
Link copied to clipboard
fun enable(input: EnableRequest): Single<RequestResponseFrame>
Enables issuing of requestPaused events.
events
Link copied to clipboard
fun events(): Flowable<Event>
Returns flowable capturing all domains events.
fun events(filter: Predicate<Event>): Flowable<Event>
Returns flowable capturing all domains events matching predicate.
fun <T : Event> events(eventClass: Class<T>): Flowable<T>
Returns flowable capturing all domain events of a given type.
fun <T : Event> events(eventClass: Class<T>, filter: Predicate<T>): Flowable<T>
Returns flowable capturing all domain events of a given type matching predicate.
failRequest
Link copied to clipboard
fun failRequest(input: FailRequestRequest): Single<RequestResponseFrame>
Causes the request to fail with specified reason.
fulfillRequest
Link copied to clipboard
fun fulfillRequest(input: FulfillRequestRequest): Single<RequestResponseFrame>
Provides response to the request.
getDependencies
Link copied to clipboard
open override fun getDependencies(): List<Domain>
Returns list of dependant domains that should be enabled prior to enabling this domain.
getResponseBody
Link copied to clipboard
fun getResponseBody(input: GetResponseBodyRequest): Single<GetResponseBodyResponse>
Causes the body of the response to be received from the server and returned as a single string.
name
Link copied to clipboard
fun name(): String
Returns domain name.
requestPaused
Link copied to clipboard
fun requestPaused(): Flowable<RequestPausedEvent>
Issued when the domain is enabled and the request URL matches the specified filter.
takeResponseBodyAsStream
Link copied to clipboard
Returns a handle to the stream representing the response body.

Sources

jvm source
Link copied to clipboard